3.1.11 \(\int (a+b x^n+c x^{2 n})^p (a+b (1+n+n p) x^n+c (1+2 n (1+p)) x^{2 n}) \, dx\) [11]

Optimal. Leaf size=20 \[ x \left (a+b x^n+c x^{2 n}\right )^{1+p} \]

[Out]

x*(a+b*x^n+c*x^(2*n))^(1+p)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.022, Rules used = {1789} \begin {gather*} x \left (a+b x^n+c x^{2 n}\right )^{p+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n + c*x^(2*n))^p*(a + b*(1 + n + n*p)*x^n + c*(1 + 2*n*(1 + p))*x^(2*n)),x]

[Out]

x*(a + b*x^n + c*x^(2*n))^(1 + p)

Rule 1789

Int[((a_) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_.) + (f_.)*(x_)^(n2_.)), x_Symbo
l] :> Simp[d*x*((a + b*x^n + c*x^(2*n))^(p + 1)/a), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && EqQ[n2, 2*n] &
& EqQ[a*e - b*d*(n*(p + 1) + 1), 0] && EqQ[a*f - c*d*(2*n*(p + 1) + 1), 0]

Rubi steps

\begin {align*} \int \left (a+b x^n+c x^{2 n}\right )^p \left (a+b (1+n+n p) x^n+c (1+2 n (1+p)) x^{2 n}\right ) \, dx &=x \left (a+b x^n+c x^{2 n}\right )^{1+p}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.47, size = 19, normalized size = 0.95 \begin {gather*} x \left (a+x^n \left (b+c x^n\right )\right )^{1+p} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n + c*x^(2*n))^p*(a + b*(1 + n + n*p)*x^n + c*(1 + 2*n*(1 + p))*x^(2*n)),x]

[Out]

x*(a + x^n*(b + c*x^n))^(1 + p)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 33, normalized size = 1.65

method result size
risch \(x \left (a +b \,x^{n}+c \,x^{2 n}\right ) \left (a +b \,x^{n}+c \,x^{2 n}\right )^{p}\) \(33\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n+c*x^(2*n))^p*(a+b*(n*p+n+1)*x^n+c*(1+2*n*(1+p))*x^(2*n)),x,method=_RETURNVERBOSE)

[Out]

x*(a+b*x^n+c*(x^n)^2)*(a+b*x^n+c*(x^n)^2)^p

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 35, normalized size = 1.75 \begin {gather*} {\left (c x x^{2 \, n} + b x x^{n} + a x\right )} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n+c*x^(2*n))^p*(a+b*(n*p+n+1)*x^n+c*(1+2*n*(1+p))*x^(2*n)),x, algorithm="maxima")

[Out]

(c*x*x^(2*n) + b*x*x^n + a*x)*(c*x^(2*n) + b*x^n + a)^p

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 35, normalized size = 1.75 \begin {gather*} {\left (c x x^{2 \, n} + b x x^{n} + a x\right )} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n+c*x^(2*n))^p*(a+b*(n*p+n+1)*x^n+c*(1+2*n*(1+p))*x^(2*n)),x, algorithm="fricas")

[Out]

(c*x*x^(2*n) + b*x*x^n + a*x)*(c*x^(2*n) + b*x^n + a)^p

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (17) = 34\).
time = 30.11, size = 63, normalized size = 3.15 \begin {gather*} a x \left (a + b x^{n} + c x^{2 n}\right )^{p} + b x x^{n} \left (a + b x^{n} + c x^{2 n}\right )^{p} + c x x^{2 n} \left (a + b x^{n} + c x^{2 n}\right )^{p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n+c*x**(2*n))**p*(a+b*(n*p+n+1)*x**n+c*(1+2*n*(1+p))*x**(2*n)),x)

[Out]

a*x*(a + b*x**n + c*x**(2*n))**p + b*x*x**n*(a + b*x**n + c*x**(2*n))**p + c*x*x**(2*n)*(a + b*x**n + c*x**(2*
n))**p

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (20) = 40\).
time = 2.99, size = 66, normalized size = 3.30 \begin {gather*} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} c x x^{2 \, n} + {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} b x x^{n} + {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n+c*x^(2*n))^p*(a+b*(n*p+n+1)*x^n+c*(1+2*n*(1+p))*x^(2*n)),x, algorithm="giac")

[Out]

(c*x^(2*n) + b*x^n + a)^p*c*x*x^(2*n) + (c*x^(2*n) + b*x^n + a)^p*b*x*x^n + (c*x^(2*n) + b*x^n + a)^p*a*x

________________________________________________________________________________________

Mupad [B]
time = 2.18, size = 35, normalized size = 1.75 \begin {gather*} {\left (a+b\,x^n+c\,x^{2\,n}\right )}^p\,\left (a\,x+b\,x\,x^n+c\,x\,x^{2\,n}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n + c*x^(2*n))^p*(a + b*x^n*(n + n*p + 1) + c*x^(2*n)*(2*n*(p + 1) + 1)),x)

[Out]

(a + b*x^n + c*x^(2*n))^p*(a*x + b*x*x^n + c*x*x^(2*n))

________________________________________________________________________________________